<style>
    .row-bettween {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        /* justify-content: space-between; */
    }

    .top-item {
        /* flex: 1; */
        padding: 5px 10px 10px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: #fff;
        font-size: 24px;
        border-radius: 10px;
        margin-left: 20px;
        margin-bottom: 10px;
        min-width: 230px;
    }

    .top-item span {
        font-size: 12px;
    }

    .row-flex {
        display: flex;

    }

    .flex-wrap {
        display: flex;
        flex-wrap: wrap;
    }

    .matter-box {
        padding: 10px;
        border-radius: 10px;
        background-color: #fff;
        flex: 1;
        min-width: 500px;
        margin-bottom: 20px;
    }

    .tag-red {
        display: flex;
        align-items: center;
        margin-bottom: 30px;
    }

    .tag-red i {
        width: 15px;
        height: 15px;
        border-radius: 50%;
        border: 5px solid #ff0000;
        margin-right: 10px;
    }

    .matter-ipt {
        padding: 5px 10px;
        border-bottom: 1px solid #f1f1f1;
        margin-left: 20px;
        min-width: 200px;
        margin-bottom: 5px;
        justify-content: space-between;
    }

    .matter-ipt span {
        color: #ff0000;
    }

    .quick {
        margin-right: 20px;
        font-size: 14px;
        text-align: center;
        margin-left: 30px;
    }

    .quick i {
        font-size: 30px;
        color: #ff0000;
        margin-bottom: 5px;
    }

    .table-box {
        /* flex: 1; */
        margin-left: 40px;
    }

    .table-box-th {
        display: flex;
        align-items: center;
        border: 1px solid #ccc;
    }

    .table-box-th div {
        width: 200px;
        height: 40px;
        font-size: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #ecebeb;
    }

    .table-title {
        color: #999;
        font-size: 14px;
        margin: 10px 0;
    }

    .table-box-th:nth-child(1) div {
        border-right: 1px solid #ccc;
    }

    .table-box-th:nth-child(2) div {
        border-right: 1px solid #ccc;
    }



    .table-box-tr {
        display: flex;
        align-items: center;
        border: 1px solid #ccc;
    }

    .table-box-tr div {
        width: 200px;
        height: 60px;
        font-size: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #fff;
    }

    .table-box-tr:nth-child(1) div {
        border-right: 1px solid #ccc;
    }

    .table-box-tr:nth-child(2) div {
        border-right: 1px solid #ccc;
    }

    .border-r {
        border-right: 1px solid #ccc;
    }

    .th-rank {
        width: 80px !important;
        border-right: 1px solid #ccc;
        height: 30px !important;
    }

    .th-service {
        width: 300px !important;
        border-right: 1px solid #ccc;
        height: 30px !important;
    }

    .th-sales-amount {
        width: 180px !important;
        height: 30px !important;
    }
</style>
<form class="form-horizontal form-commonsearch nice-validator n-default n-bootstrap" novalidate="" method="post"
    action="" id="form">
    <div class="row">
        <div class="row">
            <div class="form-group">

                <div class="col-xs-6">



                    <input style="display: none;" type="text" id="s001" class="form-control" name="starttime"
                        value="{$starttime|date='Y-m-d H:i:s',###}">
                    <input style="display: none;" type="text" id="s002" class="form-control" name="endtime"
                        value="{$endtime|date='Y-m-d H:i:s',###}">
                    <div id="reportrange" class="datetimerange"
                        style="background: #fff; cursor: pointer; padding: 5px 10px; border-radius: 10px;  width: 500px;margin-bottom: 20px;margin-left:30px;">
                        时间筛选 : <i class="fa fa-calendar"></i>&nbsp;
                        <span> {$starttime|date='Y-m-d H:i:s',###} - {$endtime|date='Y-m-d H:i:s',###} </span> <i
                            class="fa fa-caret-down"></i>
                    </div>
                </div>

                <div class="col-xs-5">
                    <button type="submit" class="btn btn-success" formnovalidate="">查询</button>

                </div>
            </div>
        </div>
    </div>
</form>



<div class="row row-bettween">
    <div class="top-item  ">
        <div class="shop-num">
            <span>实际收款金额 (元)</span>
            <div>{$pay}</div>
        </div>
    </div>
    <div class="top-item ">
        <div class="shop-num">
            <span>客户消耗金额 (元)</span>
            <div>{$pay_1}</div>
        </div>
    </div>
    <div class="top-item ">
        <div class="shop-num">
            <span>卡项销售金额 (元)</span>
            <div>{$pay_2}</div>
        </div>
    </div>
    <div class="top-item  ">
        <div class="shop-num">
            <span>服务销售金额 (元)</span>
            <div>{$pay_3}</div>
        </div>
    </div>
    <div class="top-item  ">
        <div class="shop-num">
            <span>商品销售总额 (元)</span>
            <div>{$pay_4}</div>
        </div>
    </div>
</div>
<div class="row row-bettween">
    <div class="top-item  ">
        <div class="shop-num">
            <span>客单价 (元)</span>
            <div>{$user_1}</div>
        </div>
    </div>
    <div class="top-item ">
        <div class="shop-num">
            <span>新增会员数 (人)</span>
            <div>{$user_2}</div>
        </div>
    </div>
    <div class="top-item ">
        <div class="shop-num">
            <span>成交客户数 (人)</span>
            <div>{$user_3}</div>
        </div>
    </div>
    <div class="top-item  ">
        <div class="shop-num">
            <span>开卡充值客户数 (人)</span>
            <div>{$user_4}</div>
        </div>
    </div>
    <!-- <div class="top-item  ">
        <div class="shop-num">
            <span>预约单数 (单)</span>
            <div>{$user_5}</div>
        </div>
    </div> -->
</div>
<div class="row-flex">
    <div class="matter-box" style="margin-right: 30px;">
        <div class="tag-red">
            <i></i>
            订单总览
        </div>
        <div id="order" style="width: 100%; height: 300px"></div>
    </div>
    <div class="matter-box">
        <div class="tag-red">
            <i></i>
            销售额总览
        </div>
        <div id="sale" style="width: 100%; height: 300px"></div>
    </div>
</div>
<div class="row-flex">
    <div class="matter-box">
        <div class="tag-red">
            <i></i>
            用户总览
        </div>
        <div class="row-bettween">
            <div id="user" style="flex:1;min-width: 500px; height: 300px"></div>
            <div class="table-box">
                <div class="table-box-th">
                    <div>总会员数</div>
                    <div>新增会员数</div>
                    <div>下单会员数</div>
                </div>
                <div class="table-box-tr">
                    <div>{$totaluser}</div>
                    <div>{$todayusersignup}</div>
                    <div>{$orderuser}</div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="matter-box">
    <div class="tag-red">
        <i></i>
        销售排行
    </div>
    <div class="flex-wrap">
        <div class="table-box" style="margin-bottom: 10px;">
            <div class="table-title">服务销售排行</div>
            <div class="table-box-th ">
                <div class="th-rank">排名</div>
                <div class="th-service">服务名称</div>
                <div class="th-sales-amount">销量</div>
            </div>
            {foreach name="i_4" item="vo"}
            <div class="table-box-tr">
                <div class="th-rank">{$key + 1}</div>
                <div class="th-service">{$vo.title}</div>
                <div class="th-sales-amount">{$vo.i_sum}</div>
            </div>
            {/foreach}
        </div>
        <div class="table-box">
            <div class="table-title">服务销售金额排行</div>
            <div class="table-box-th ">
                <div class="th-rank">排名</div>
                <div class="th-service">服务名称</div>
                <div class="th-sales-amount">服务销售金额（元）</div>
            </div>
            {foreach name="i_3" item="vo"}
            <div class="table-box-tr">
                <div class="th-rank">{$key + 1}</div>
                <div class="th-service">{$vo.title}</div>
                <div class="th-sales-amount">{$vo.i_sum}</div>
            </div>
            {/foreach}
        </div>
    </div>
    <div class="flex-wrap">
        <div class="table-box" style="margin-bottom: 10px;">
            <div class="table-title">商品销售排行</div>
            <div class="table-box-th ">
                <div class="th-rank">排名</div>
                <div class="th-service">商品名称</div>
                <div class="th-sales-amount">销量</div>
            </div>
            {foreach name="i_2" item="vo"}
            <div class="table-box-tr">
                <div class="th-rank">{$key + 1}</div>
                <div class="th-service">{$vo.title}</div>
                <div class="th-sales-amount">{$vo.i_sum}</div>
            </div>
            {/foreach}
        </div>
        <div class="table-box">
            <div class="table-title">商品销售金额排行</div>
            <div class="table-box-th ">
                <div class="th-rank">排名</div>
                <div class="th-service">商品名称</div>
                <div class="th-sales-amount">商品销售金额（元）</div>
            </div>
            {foreach name="i_1" item="vo"}
            <div class="table-box-tr">
                <div class="th-rank">{$key + 1}</div>
                <div class="th-service">{$vo.title}</div>
                <div class="th-sales-amount">{$vo.i_sum}</div>
            </div>
            {/foreach}
        </div>
    </div>
    <div class="flex-wrap">
        <div class="table-box" style="margin-bottom: 10px;">
            <div class="table-title">卡项销售排行</div>
            <div class="table-box-th ">
                <div class="th-rank">排名</div>
                <div class="th-service">卡项名称</div>
                <div class="th-sales-amount">销量</div>
            </div>
            {foreach name="i_6" item="vo"}
            <div class="table-box-tr">
                <div class="th-rank">{$key + 1}</div>
                <div class="th-service">{$vo.title}</div>
                <div class="th-sales-amount">{$vo.i_sum}</div>
            </div>
            {/foreach}
        </div>
        <div class="table-box">
            <div class="table-title">卡项销售金额排行</div>
            <div class="table-box-th ">
                <div class="th-rank">排名</div>
                <div class="th-service">卡项名称</div>
                <div class="th-sales-amount">卡项销售金额（元）</div>
            </div>
            {foreach name="i_5" item="vo"}
            <div class="table-box-tr">
                <div class="th-rank">{$key + 1}</div>
                <div class="th-service">{$vo.title}</div>
                <div class="th-sales-amount">{$vo.i_sum}</div>
            </div>
            {/foreach}

        </div>
    </div>
</div>
<div class="row-flex">
    <div class="matter-box">
        <div class="tag-red">
            <i></i>
            交易分析
        </div>
        <div class="row-bettween">
            <div class="table-box">
                <div class="table-box-th ">
                    <div class="th-rank">排名</div>
                    <div class="th-sales-amount border-r">收款方式</div>
                    <div class="th-sales-amount border-r" style="width: 250px;">实际收款金额(元)</div>
                    <div class="th-sales-amount">占比</div>
                </div>
                {foreach name="i_7" item="vo"}
                <div class="table-box-tr">
                    <div class="th-rank">{$key + 1}</div>
                    <div class="th-sales-amount border-r">{$vo.name}</div>
                    <div class="th-sales-amount border-r" style="width: 250px;">{$vo.value}</div>
                    <div class="th-sales-amount">{$vo.i_sum}</div>
                </div>
                {/foreach}
            </div>
            <div id="ranking" style="flex:1;min-width: 400px; height: 300px"></div>
        </div>
    </div>
</div>
<div class="row-flex">
    <div class="matter-box">
        <div class="tag-red">
            <i></i>
            开卡充值
        </div>
        <div class="row-bettween">
            <div class="table-box">
                <div class="table-box-th ">
                    <div class="th-rank">类型</div>
                    <div class="th-service">开卡充值金额</div>
                    <div class="th-sales-amount">数量</div>
                </div>
                {foreach name="i_10" item="vo"}
                <div class="table-box-tr">
                    <div class="th-rank">{$vo.name}</div>
                    <div class="th-service">{$vo.value}</div>
                    <div class="th-sales-amount">{$vo.sum}</div>
                </div>
                {/foreach}
            </div>
            <div id="openCard" style="flex:1;min-width: 400px; height: 300px"></div>
        </div>
    </div>
</div>